Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@elvia/elvis-colors
Advanced tools
This package is meant for internal use only. All colors are available through Elvis. This package should not be imported by an end-user directly.
Available colors reflect the colors illustrated at https://design.elvia.io/brand/color#Overview.
All Color variables are named Elvia< Name > in CamelCase. Eg ElviaBlack, ElviaOrangeMango.
Insert at top of your scss file :
@use '@elvia/elvis-colors';
If this does not work for you, you may need to specify:
@use '@elvia/elvis-colors/dist/elviaColors.scss';
Example:
border: 1px solid elviaColors.$ElviaBlack;
For making all variables accessible throughout your project you can use @Import. This function will be deprecated by sass in the future and we therefore recommend applying @use instead.
Add colors file from package to scss file like:
@import '~@elvia/elvis-colors';
If this does not work for you, you may need to specify:
@import '~@elvia/elvis-colors/dist/colors.scss';
Example:
border: 1px solid $ElviaBlack;
To use this package you can import the function getThemeColor()
. It takes the label of the requested color
as input, and returns a css variable with a fallback to its its hex value if it exists in the Elvia colors.
import { getThemeColor } from '@elvia/elvis-colors';
const color = getThemeColor('state-on');
Likewise, the function getThemeColorContrast()
is provided to get a contrast text color corresponding to the
requested color.
A previous version of this package provided the function getColor()
. This function is now deprecated and
will be removed in a future version. It takes the label of the requested color as input, and returns its hex
value.
import { getColor } from '@elvia/elvis-colors';
const color = getColor('elvia-charge');
The json and scss-files are generated from the colors object in the ts file. When making changes, remember to
run yarn build
afterwards.
FAQs
Elvia colors
The npm package @elvia/elvis-colors receives a total of 1,634 weekly downloads. As such, @elvia/elvis-colors popularity was classified as popular.
We found that @elvia/elvis-colors demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.